/*
 * Copyright 2007 Stéphane Brunner <stephane.brunner@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY, without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 */

#ifndef __TESTWIDGET_H__
#define __TESTWIDGET_H__

#include <swscale.h>
#include <avformat.h>

#include <QPixmap>
#include <QWidget>


class GLVideo : public QWidget
{
  Q_OBJECT

public:
  GLVideo(int width, int height, QWidget *parent = 0);
  virtual ~GLVideo();
  void setFrame(AVPicture *frame);
protected:
  virtual void paintEvent( QPaintEvent* ev );
private:
  QPixmap m_pixmap;
//   GLuint texture;
  SwsContext *scale_context;
  AVPicture resized_frame;
//  AVPicture original_frame;
};

#endif //__TESTWIDGET_H__
